source('~/Desktop/BERQ_revision_2/Supplementary Material/data/world bank/null_growth_model/absolute_null.R')
setwd(dir)
setwd(dir)
fwrite(output, "absolute_p_values")
source('~/Desktop/BERQ_revision_2/Supplementary Material/data/world bank/null_growth_model/absolute_null.R')
wd = gsub("null_growth_model", "within_country_growth_rates", dir)
setwd(wd)
mean_slopes = fread("absolute_dematerial_internal.csv.csv")
library(data.table)
library(ggplot2)
library(here)
library(gridExtra)
library(grid)
library(gtable)
library(magrittr)
library(RcppArmadillo)
library(snow)
library(doSNOW)
library(foreach)
library(tcltk)
# min sample size
n_min = 20
n_iteration = 100
slope_test = 0.5
# source null function
dir = here()
setwd(dir)
source("null_function.R")
# world bank data
wd = gsub("null_growth_model", "", dir)
setwd(wd)
d = fread("wdi.csv")
d$EG.USE.PCAP.KG.OE = d$EG.USE.PCAP.KG.OE*4.187/100
# within-country mean slopes
wd = gsub("null_growth_model", "within_country_growth_rates", dir)
setwd(wd)
mean_slopes = fread("absolute_dematerial_internal.csv.csv")
mean_slopes = fread("absolute_dematerial_internal.csv")
View(mean_slopes)
source('~/Desktop/BERQ_revision_2/Supplementary Material/data/world bank/null_growth_model/absolute_null.R')
View(output)
source('~/Desktop/BERQ_revision_2/Supplementary Material/data/world bank/null_growth_model/absolute_null.R')
source('~/Desktop/BERQ_revision_2/Supplementary Material/data/world bank/null_growth_model/absolute_null.R')
source('~/Desktop/BERQ_revision_2/Supplementary Material/data/world bank/null_growth_model/relative_null.R')
View(output)
source('~/Desktop/BERQ_revision_2/Supplementary Material/data/world bank/null_growth_model/relative_null.R')
